import React from "react";
import styles from "./header.less";
// import { req } from "@/utils/request/index";

const Link = () => {
  // const [obj, setObj] = useState<any>();
  //
  // useEffect(() => {
  //   req("/nav/header").then(res => {
  //     console.log(res);
  //     setObj(res.nav.navLink);
  //   });
  // }, []);

  let nav = [
    { name: "主站", link: "#", icon: "" },
    { name: "番剧", link: "#", icon: "" },
    { name: "游戏中心", link: "#", icon: "" },
    { name: "直播", link: "#", icon: "" },
    { name: "会员购", link: "#", icon: "" },
    { name: "漫画", link: "#", icon: "" },
    { name: "赛事", link: "#", icon: "" },
    { name: "下载APP", link: "#", icon: "" }
  ];

  return (
    <ul className={styles.navLink}>
      {/*{obj &&*/}
      {/*  obj.map(item => (*/}
      {/*    <li key={item.id}>*/}
      {/*      <a href={item.link}>*/}
      {/*        <i className="iconfont">&#xe62d;</i>*/}
      {/*        {item.name}*/}
      {/*      </a>*/}
      {/*    </li>*/}
      {/*  ))}*/}
      {nav.map((item, index) => (
        <li key={index}>
          <a href={item.link}>
            <i className="iconfont">{item.icon}</i>
            {item.name}
          </a>
        </li>
      ))}
    </ul>
  );
};
export default Link;
